﻿using BCCommon.Enums;
using BCCommon.PaymentEnums;
using BCEntity.Common.Payment.WeChatPayBill.WxPayBillDetail;
using BCEntity.Common.Payment.WeChatPayBill.WxPayBillStatistics;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Common.Payment.WxPayBill
{
    /// <summary>
    /// 微信支付对账单
    /// </summary>
    public interface IWxPayBillData
    {
        /// <summary>
        /// 某一天微信支付对账单记录是否存在
        /// </summary>
        /// <param name="tradeDate">交易日期</param>
        /// <param name="billType">微信支付账单类型</param>
        /// <returns></returns>
        Task<bool> SomeDayBillExists(DateTime tradeDate, WeChatBillType billType);
        /// <summary>
        /// 添加微信支付对账单记录
        /// </summary>
        /// <param name="detailEntity">对账单详情</param>
        /// <param name="statisticsEntity">统计详情</param>
        /// <returns></returns>
        Task<bool> Insert(List<WxPayBillDetailEntity> detailEntity, WxPayBillStatisticsEntity statisticsEntity);
        /// <summary>
        /// 获取某一天微信对账单记录
        /// </summary>
        /// <param name="tradeDate">交易日期</param>
        /// <param name="weChatBillType">微信支付账单类型</param>
        /// <returns></returns>
        Task<(IEnumerable<WxPayBillDetailEntity>, WxPayBillStatisticsEntity)> GetSomeDayBill(DateTime tradeDate, WeChatBillType weChatBillType);
        /// <summary>
        /// 获取某一月微信对账单记录
        /// </summary>
        /// <param name="year">年</param>
        /// <param name="month">月</param>
        /// <param name="weChatBillType">微信支付账单类型</param>
        /// <returns></returns>
        Task<(IEnumerable<WxPayBillDetailEntity>, WxPayBillStatisticsEntity)> GetSomeMonthBill(int year,int month, WeChatBillType weChatBillType);
        /// <summary>
        /// 获取某一月微信对账单记录
        /// </summary>
        /// <param name="year">年</param>
        /// <param name="weChatBillType">微信支付账单类型</param>
        /// <returns></returns>
        Task<(IEnumerable<WxPayBillDetailEntity>, WxPayBillStatisticsEntity)> GetSomeYearBill(int year, WeChatBillType weChatBillType);
        /// <summary>
        /// 获取账单详情
        /// </summary>
        /// <param name="paymentRecordId">支付记录Id</param>
        /// <returns></returns>
        Task<WxPayBillDetailEntity> GetEntityByPaymentRecordId(long paymentRecordId);
    }
}
